<template>
  <div class="company-list-1">
    <div class="header">
      <div class="prefix"></div>
      <div class="header-title"><span>重点关注养户</span></div>
    </div>
    <div class="content">
      <template v-if="props.info?.length">
        <div class="content-list" v-for="(item, index) in props.info" :key="index">
          <div class="content-list-ul">
            <div class="content-list-li point">
              <span style="font-size: 26px">{{ item.no }}</span> TH
            </div>
            <div class="content-list-li" style="margin-left: 20px; margin-right: 80px">
              {{ item.name }}
            </div>
            <div class="content-list-li" style="margin-right: 20px">{{ item.info }}</div>
            <div class="content-list-li" style="font-size: 30px">
              {{ item.count }}
            </div>
          </div>
        </div>
      </template>
      <Empty v-else></Empty>
    </div>
  </div>
</template>

<script setup>
import { ref, onMounted, onUnmounted } from 'vue'

const props = defineProps({
  info: {
    type: Array,
    default: () => []
  }
})
</script>

<style scoped lang="scss">
@import '@/assets/table.css';

.company-list-1 {
  padding: 10px;
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  font-size: 16px;

  .header {
    width: 100%;
    height: 50px;
    display: flex;
    align-items: center;
    padding-left: 20px;

    .prefix {
      width: 8px;
      height: 15px;
      background-color: #31a7ff;
    }

    .header-title {
      padding-left: 10px;
      display: flex;
      flex: 1;
      justify-content: space-between;
    }
  }

  .content {
    width: 450px;
    height: 240px;
    padding: 0 10px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;

    &-list {
      width: 100%;
      height: 50px;
      background: url('@/assets/monitor/u961.svg') no-repeat center center;
      margin-bottom: 10px;

      :last-child {
        margin-bottom: 0;
      }

      &-ul {
        width: 100%;
        height: 50px;
        display: flex;
        align-items: center;
        padding: 0 20px;

        .point {
          width: 75px;
          height: 50px;
          font-size: 12px;
          display: flex;
          justify-content: center;
          align-items: center;
          font-weight: bold;
          background: url('@/assets/monitor/u962.svg') no-repeat center center;
        }
      }
    }
  }
}
</style>
